﻿// (c) Copyright Webber-Cross Software Ltd.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using WebberCross.Obelisk.MVVMDemo.ViewModel;

namespace WebberCross.Obelisk.MVVMDemo
{
    public partial class MainPage : PhoneApplicationPage
    {
        private readonly MainViewModel _vm = null;

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            this._vm = new MainViewModel();
            this.DataContext = _vm;

            // Register View Model with TombstoneHelper
            PersistenceManager.Instance.Register("_vm", _vm);
        }
    }
}